package com.powernobug.service.impl;

import com.powernobug.mapper.MarketIssueMapper;
import com.powernobug.service.MarketIssueService;
import com.powernobug.bean.model.MarketIssue;
import com.powernobug.bean.model.MarketIssueExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.concurrent.Future;

/**
 * @Author: 肖云戈
 * @CreateTime: 2024-09-02
 * @Description:
 */
@Service
public class MarketIssueServiceImpl implements MarketIssueService {

    @Autowired
    MarketIssueMapper marketIssueMapper;

    @Override
    public Future<List<MarketIssue>> getIssueList() {
        MarketIssueExample example = new MarketIssueExample();
        example.createCriteria().andDeletedEqualTo(false);
        example.setOrderByClause("id asc");

        return new AsyncResult<>(marketIssueMapper.selectByExample(example));
    }
}
